All Questions
237 questions
4votes
1answer
437views
Get visitor current city via API or display the city the user searched for
I am writing a simple PHP script to display all my available stores in google map. If the user just came in, I need to set the user current city as default city using geolocation (3rd party); ...
3votes
1answer
90views
Session Logic for User Verification in Rails Migration
This is a logic to create sessions on RoR 7.1.2 based on the last version of the website which was in vanilla PHP, with the upgrade I have to deal with the users that were already signed up but not ...
9votes
1answer
297views
Convert integer to Roman numeral string
This is my 1st time developing PHP code and I am only 13 years old. I have experience in other programming languages like lua, python, and c++. This is a simple Number to Roman Numeral code I made for ...
3votes
2answers
1kviews
Saving form data to a text file on server
I want to save simple string data as a simple text file (.txt) on the server (together with the IP), but I cannot find any clear guideline on how to do this correctly/efficiently/safely. (Maybe I'm ...
3votes
1answer
479views
Generating responsive image html with php?
As a beginner in php, I welcome you feedback on improving or simplifying the following php code that generates this responsive image html (image sizes and formats are auto-generated using Gulp). For ...
0votes
2answers
220views
Product list from database to web tables/boxes
I am a self-taught front-end developer, trying to land a job, the PHP and MySQL are quite new to me, since I only watched and did some code through Traversy Media courses. This is a test project, ...
3votes
1answer
152views
New in PHP OOP and need opinion am I doing it the right way
I am new to using PHP OOP and decided to start learning by converting something I wrote in procedural PHP. So now I need your opinion and recommendations for my first work. One of the main reasons I ...
6votes
2answers
576views
Password reset system in PHP
What I try to achieve I need to create a secure forgot password reset system. I am especially worrying about the security of this code and how to further improve it. Here's my code: ...
6votes
1answer
162views
Basic login system with 2 factor authentication
What I try to achieve I need to create a administration-panel for a website. Therefore, I need a possibility to protect the content of the panel via a password. The functionality doesn't have to be ...
4votes
1answer
720views
Create a CSV from SQL Data and email as attachment using PHP
I put together some functions that allows a PHP script to send the SQL data obtained from user inputs on a website via an email attachment as a CSV file. It works perfectly and I have no issues with ...
3votes
0answers
51views
Add pivot data from the same pivot model [closed]
My project has thee models Cart, Order and ProductCart ...
4votes
3answers
289views
PHP comment system
Basics I created a simple comment system. My goal was it to create a system that can easily be used on everyone's server without having to install a load of programs. I also tried to create it as ...
3votes
2answers
229views
Contact form with spam-prevention - follow-up
Background The basics of this project are already covered here. I received the suggestions to: not create the exercise with JavaScript. use pictures instead of plaintext. I tried to implement the ...
3votes
1answer
360views
Contact form with spam-prevention
Idea After a handfull of small javascript-projects, I also wanted to work a bit with php now. I decided to create a simple contact-form. Of course, I wanted it to be as spam-save as possible, so I ...
4votes
1answer
964views
Rock, Paper, Scissor - Game
This is my first ever created game. I been slowly but continuously learning PHP for the past 2 months and just last night I thought that I might be able to create a simple and very basic game. Due to ...